package com.hsjk.szwj.module.train.controller.admin.vo;

import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @author chenjiawei
 * @desc
 * @Date 2023/10/06 18:54
 **/
@Data
public class AdminCreateCourseReqVO {

    @NotEmpty(message = "课程名称不能为空")
    private String courseName;

    @NotEmpty(message = "课程封面不能为空")
    private String courseCoverUrl;

    @NotEmpty(message = "车辆类型不能为空")
    private String carType;

    @NotNull(message = "是否推荐不能为空")
    private Boolean isRecommend;

    @NotNull(message = "有效天数不能为空")
    private Integer validDays;

    @NotNull(message = "排序不能为空")
    private Integer sortNo;

    @NotEmpty(message = "课程详情不能为空")
    private String courseDetail;

    private SpuInfo spuInfo;

    private SkuInfo skuInfo;

    @Data
    public static class SpuInfo {
        @NotNull(message = "spu状态不能为空")
        private Integer status;
        @NotNull(message = "虚拟销量不能为空")
        private Integer virtualSalesCount;
    }

    @Data
    public static class SkuInfo {
        @NotNull(message = "销售价格不能为空")
        private Long price;
        private String payNote;
    }
}
